const getAllCategories=()=>{
    return $axios({
        url:`category/findAll`,
        method:'get'
    })
}

const addCategory=(params)=>{
    return $axios({
        url:`category/add`,
        method:'post',
        data:{...params}
    })
}

const deleteCategory=(id)=>{
    return $axios({
        url:`category/deleteById/${id}`,
        method:'delete'
    })
}

const findCategoryById=(id)=>{
    return $axios({
        url:`category/findById/${id}`,
        method:'get'
    })
}

const updateCategory=(params)=>{
    return $axios({
        url:'/category/update',
        method:'put',
        data: {...params}
    })
}